package com.pj.ca.constant;

/**
 * 描述：证书类型枚举
 *
 * @author pengjun
 * @date 2021/9/13 16:33
 */
public class CaConstant {
    //签发者DN
    public static String ISSUSE_DN="C=CN,ST=ZJ,L=HANGZHOU,O=杭州电签平台,OU=杭州电签平台,CN=杭州电签平台,E=815175699@qq.com";

    public enum KeyType{
        RSA("RSA", 1),
        SM2("SM2", 2),
        ECDSA("ECDSA", 3),
        DSA("DSA", 4);
        public String name;
        public Integer value;
        KeyType(String name, Integer value) {
            this.name = name;
            this.value = value;

        }

        public static KeyType forValue(Integer value) {
            KeyType[] values = KeyType.values();
            for (KeyType v : values) {
                if (v.value.equals(value)) {
                    return v;
                }
            }
            return null;
        }

    }

}
